#ifndef _PROTECTION_H_
#define _PROTECTION_H_

typedef struct 
	{
	    u8 Trigger 				:1;
	    u8 HW_Approach 			:1;
	    u8 PowerControl			:1;
	    u8 HW_Approach_Disable 	:1;
	} HW_State;
	
typedef union 
	{
	    HW_State bits;
	    u8 Mdata;
	} HW_State_type;
	

extern vu8 ErrRecoveryTimer;
extern vu16 u16ErrorBuf;
extern volatile HW_State_type  HW_State_type1;

void ProtectWithAD_Task();
void NTC_Detect();
void OverTEMP_PowerDrop();
void Protect_ErrRecovery();  
void Surge_Protect();	

#endif